var arr = [];
for(var i=0;i<  10;i++){
    arr[i] = i*10;
}

for(var k in arr){
    console.log("数组中第"+k+"个元素是:"+arr[k]);
}

var str = "hellojack";
for(var a in str){
    console.log(a+"字符:"+str[a]);
}
console.log("=============================================");

var person={
    name:"anna",
    age:18,
    walk:function(){
        console.log("anna is walking");
        
    }
}
// 遍历对象的属性和方法
for(var p in person){
    console.log(p+": "+person[p]);
    
}
console.log("=============================================");
var a = [],i=0;
for(a[i++] in person){
    console.log(a);
}

var num =18;
for(var n in num){
    console.log(n);
    
}


